package net.zisen.cloud.order.model;


import lombok.*;
import org.beetl.sql.core.annotatoin.Table;

/**
 * OOrder Dao
 *
 * @author time
 * @date 2019/05/17 15:29
 */
@Table(name = "o_order")
@Getter
@Setter
@ToString
@EqualsAndHashCode
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class Order {

    /**
     * 主键id
     */
    private Long id;
    /**
     * 订单号
     */
    private String num;
    /**
     * 用户id
     */
    private Long uid;
    /**
     * 总金额
     */
    private java.math.BigDecimal totalAmount;
    /**
     * 订单状态
     */
    private Integer state;
    /**
     * 新增时间
     */
    private java.util.Date addTime;
    /**
     * 修改时间
     */
    private java.util.Date editTime;

    public enum State {
        NEW(100), PAID(200), EXPIRED(300);

        private int state;

        State(int state) {
            this.state = state;
        }

        public int getState() {
            return state;
        }
    }


}
